package com.shenfa.util;

import java.io.IOException;
import java.util.Properties;

public class Config {
	private static Properties properties;
	/**
	 * 根据参数值获取参数名
	 * @param param
	 * @return
	 */
	public static String getValue(String param){
		if(null==properties)init();
		return (String) properties.get(param);
	}
	
	public static void  init(){
		properties = new Properties();
		try {
			properties.load(Config.class.getClassLoader().getResourceAsStream("config.properties"));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
